package com.jack.vipmis.vip.wei.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson.annotation.JSONType;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.jack.vipmis.common.entity.BaseEntity;

/**
 * 微贴列表
 * 
 * @author JackLiang
 * @date 2014-7-2
 * @version 1.0
 */
@Entity
@Table(name = "wei_circle")
@JSONType(serialzeFeatures=SerializerFeature.WriteNullStringAsEmpty)
public class Circle extends BaseEntity<Long> {

	public static final int	STATE_NONE		= 0;			// 无状态
	public static final int	STATE_NORMAL	= 1;			// 普通贴
	public static final int	STATE_ADS		= 2;			// 广告贴
	public static final int	STATE_GONGGAO	= 3;			// 公告贴
	/**
	 * 帖子标题
	 */
	@NotNull(message = "not.null")
	@Column
	private String			postTitle;
	/**
	 * 帖子类型
	 */
	@Column(name = "category_id")
	private Long			Category;
	/**
	 * 帖子内容
	 */
	@Column
	private String			postContent;
	/**
	 * 帖子图片
	 */
	@Column
	private String			postPic;
	/**
	 * 创建时间
	 */
	@Column(name = "create_time")
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date			postCreateTime	= new Date();
	/**
	 * 赞 数
	 */
	@Column
	private Long			postUpCount;
	/**
	 * 最后一个回复ID
	 */
	@Column
	private Long			replyId;
	/**
	 * 最后回复时间
	 */
	@Column
	private Long			postDisplayTime;

	/**
	 * 是否赞过
	 */
	@Column(name = "is_support")
	private Boolean			support			= false;
	/**
	 * 预留
	 */
	@Column(name = "ext")
	public String			postCommentCount;

	@Column
	private Long			userId;

	@Column
	private String			userName;

	@Column
	private String			userAvatar;

	@Column
	private String			cityName;
	/**
	 * 用户性别
	 */
	@Column
	private Integer			userGender;

	/**
	 * 状态
	 */
	@Column(name = "is_show")
	private Boolean			show;

	// setter getter
	public String getPostTitle() {
		return postTitle;
	}

	public void setPostTitle(String postTitle) {
		this.postTitle = postTitle;
	}

	public Long getCategory() {
		return Category;
	}

	public void setCategory(Long category) {
		Category = category;
	}

	public String getPostContent() {
		return postContent;
	}

	public void postCreateTime(String postContent) {
		this.postContent = postContent;
	}

	public void setPostContent(String postContent) {
		this.postContent = postContent;
	}

	public String getPostPic() {
		return postPic;
	}

	public void setPostPic(String postPic) {
		this.postPic = postPic;
	}

	public Date getPostCreateTime() {
		return postCreateTime;
	}

	public void setPostCreateTime(Date postCreateTime) {
		this.postCreateTime = postCreateTime;
	}

	public Long getPostUpCount() {
		return postUpCount;
	}

	public void setPostUpCount(Long postUpCount) {
		this.postUpCount = postUpCount;
	}

	public Long getReplyId() {
		return replyId;
	}

	public void setReplyId(Long replyId) {
		this.replyId = replyId;
	}

	public Long getPostDisplayTime() {
		return postDisplayTime;
	}

	public void setPostDisplayTime(Long postDisplayTime) {
		this.postDisplayTime = postDisplayTime;
	}

	public Boolean getSupport() {
		return support;
	}

	public void setSupport(Boolean support) {
		this.support = support;
	}

	public String getPostCommentCount() {
		return postCommentCount;
	}

	public void setPostCommentCount(String postCommentCount) {
		this.postCommentCount = postCommentCount;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserAvatar() {
		return userAvatar;
	}

	public void setUserAvatar(String userAvatar) {
		this.userAvatar = userAvatar;
	}

	public Integer getUserGender() {
		return userGender;
	}

	public void setUserGender(Integer userGender) {
		this.userGender = userGender;
	}

	public Boolean getShow() {
		return show;
	}

	public void setShow(Boolean show) {
		this.show = show;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

}
